Test Series - Data Structure

Test Number 74/115

Q: How many child nodes does each node of Ternary Tree contain?
A. 4
B. 6
C. 5
D. 3
Solution: Each node of Ternary tree contains at most 3 nodes. So Ternary tree can have 1, 2 or 3 child nodes but not more than that.
Q: Which of the following is the name of the node having child nodes?
A. Brother
B. Sister
C. Mother
D. Parent
Solution: Parent node is the node having child nodes and child nodes may contain references to their parents. Parent node is a node connected by a directed edge to its child.
Q: What is the depth of the root node of the ternary tree?
A. 2
B. 1
C. 0
D. 3
Solution: Depth is defined as the length of the path from root to the node. So the depth of root node in ternary tree is 0.
Q: What is the Height of the root node of ternary tree?
A. 1
B. 2
C. 3
D. 0
Solution: Height of ternary tree is defined as the length of path from root to deepest node in tree. Therefore, height off root node in ternary tree is 0.
Q: How many extra nodes are there in Full ternary tree than a complete ternary tree?
A. 1
B. 2
C. Both have same number of nodes
D. 3
Solution: Every Full ternary tree is also a complete ternary tree. Therefore, both have same number of nodes.
Q: Can leaf node be called child node in a ternary tree?
A. True
B. False
C. none
D. ....
Solution: Leaf node is a node that has no child. Since Leaf node will always be the node on the last level of ternary tree, so it can be called child node of given parent node in ternary tree.
Q: Can child node be always called Leaf node in the ternary tree?
A. True
B. False
C. none
D. ....
Solution: Leaf node is any node that does not contain any children. Child node may or may not contain more nodes. Child node will only be called leaf Node if the node has no child node.
Q: Which of the following is the implementation of the ternary tree?
A. AVL Tree
B. Ternary Heap
C. Hash Table
D. Dictionary
Solution: Ternary tree is used to implement ternary search tree and ternary heap. While AVL Tree, hash Table, dictionary are different types of Data Structures.

You Have Score    /8